//
//  HitInfo.cpp
//  RayTracer
//
//  Created by 俞云康 on 2/15/16.
//  Copyright © 2016 yushroom. All rights reserved.
//

#include "HitInfo.hpp"
#include "Primitive.hpp"

Color HitInfo::Le(const Direction &w) const {
	const auto& al = primitive->getAreaLight();
	return al != nullptr ? al->L(position, normal, w) : Color(0.f, 0.f, 0.f);
}